
import React from 'react'
import { connect } from 'dva-no-router'
import { bindActionCreators } from 'redux'

import UI from '../components/photograph/capture';

class App extends React.Component {
  render() {
    return (
      <UI {...this.props}/>
    )
  }
}

const actions = {
  saveSuccess: (val) => ({type: 'photo/saveSuccess', payload:val}),
  upload: (val) => ({type: 'photo/upload', payload:val}),
};

const mapProps = ({photo}) => ({...photo});

const mapActions = dispatch => ({
  ...bindActionCreators({...actions}, dispatch)
});

export default connect(mapProps, mapActions)(App)